/**
 * problem_ 67.c
 * Copyright (C) 2011-03-19 - xrose
 */

#include <stdio.h>
#include "problem_067.h"

int main (int argc, char *argv[])
{
    int i, j;
    int count = 0;
    for(i=98; i>=0; i--)
    {
        for(j=(i*(i+3)/2); j>=(i*(i+1)/2); j--)
        {
            if((c[j]+c[j+i+1])>(c[j]+c[j+i+2]))
            {
                c[j] = c[j]+c[j+i+1];
            } else
            {
                c[j] = c[j]+c[j+i+2];
            }
            printf("_%d", c[j]);
            count++;
            printf("lap lan thu' %d\n", count);
        }
        puts("");
    }
    printf("__%d__%d\n", c[0], count);
    return 0;
}
